package com.mall.service.impl;

import com.mall.dto.VSys_user;
import com.mall.mapper.Sys_userMapper;
import com.mall.po.Sys_user;
import com.mall.service.Sys_userService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zhanggaoxiang
 * @ClassName 用户业务实现类
 * @Description TODO
 * @Date 2021/1/5 19:34
 * @Version 1.0
 **/
@Service
public class Sys_userServiceImpl implements Sys_userService{
    @Resource
    private Sys_userMapper sys_userMapper;
    /**
     * @Author zhanggaoxiang
     * @Description 按照用户名查询用户信息
     * @Date 2021/1/6 16:05
     * @Param [username]
     * @return com.mall.po.Sys_user
     **/
    @Override
    public Sys_user findUserByUsername(String username) {
        return sys_userMapper.findUserByUsername(username);
    }
    /**
     * @Author zhanggaoxiang
     * @Description 根据用户名查询用户权限
     * @Date 2021/1/8 11:51
     * @Param [username]
     * @return com.mall.po.Sys_user
     **/
    @Override
    public VSys_user findUserRoleByUsername(String username) {
        return sys_userMapper.findUserRoleByUsername(username);
    }
}
